package com.ioi.base;

import java.io.Serializable;

/**
 * 微信接口响应对象
 *
 * @author LILIBO
 * @since 2024/6/3
 */
public class WxRes implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 成功状态码
     */
    public static final int CODE_SUCCESS = 0;
    /**
     * 获取access_token时AppSecret错误，或者access_token无效
     */
    public static final int CODE_40001 = 40001;

    /**
     * 微信错误代码
     */
    private int errorCode;

    /**
     * 微信错误信息（如果可以翻译为中文，就为中文）
     */
    private String errorMsg;

    /**
     * 微信接口返回的错误原始信息（英文）
     */
    private String errorMsgEn;

    /**
     * 响应的JSON数据
     */
    private String json;

    public WxRes() {
    }

    public WxRes(int errorCode, String errorMsg, String errorMsgEn, String json) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.errorMsgEn = errorMsgEn;
        this.json = json;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getErrorMsgEn() {
        return errorMsgEn;
    }

    public void setErrorMsgEn(String errorMsgEn) {
        this.errorMsgEn = errorMsgEn;
    }

    public String getJson() {
        return json;
    }

    public void setJson(String json) {
        this.json = json;
    }

}
